import { Request } from "@/utils/request";

const url = {
  getAuthorDetail: "/entity/author/info",
  getAuthorPapers: "/entity/author/paper",
  getJournalDetail: "/entity/journal/info",
  getJournalPapers: "/entity/journal/paper",
  getOrgDetail: "/entity/org/info",
  getOrgPapers: "/entity/org/paper",
  getOrgAnnualCitation: "/entity/org/AnnualCitation",
  getContribution: "/entity/org/contribution",
  send: "/entity/claim",
  editIntro: "/entity/author/intro",
  getAuthorCitation: "/entity/org/AuthorCitation",
  getPaperCitation: "/entity/org/PaperCitation",
  getAnnualPaper: "/entity/journal/AnnualPaper",
  getCitationPerIssue: "/entity/journal/CitationPerIssue",
  getAuthorAnnualPaper: "/entity/author/AnnualPaper",
  getAuthorRelations: "/entity/author/relation",
};

export const entity = {
  //获取学者信息
  getAuthorDetail: function (params: any) {
    return Request.axiosInstance({
      url: url.getAuthorDetail,
      method: "get",
      params: params,
    });
  },
  // 获取学者发布的论文
  getAuthorPapers: function (params: any) {
    return Request.axiosInstance({
      url: url.getAuthorPapers,
      method: "get",
      params: params,
    });
  },
  //获取期刊/会议信息
  getJournalDetail: function (params: any) {
    return Request.axiosInstance({
      url: url.getJournalDetail,
      method: "get",
      params: params,
    });
  },
  // 获取期刊/会议发布的论文
  getJournalPapers: function (params: any) {
    return Request.axiosInstance({
      url: url.getJournalPapers,
      method: "get",
      params: params,
    });
  },
  //获取机构信息
  getOrgDetail: function (params: any) {
    return Request.axiosInstance({
      url: url.getOrgDetail,
      method: "get",
      params: params,
    });
  },
  // 获取机构发布的论文
  getOrgPapers: function (params: any) {
    return Request.axiosInstance({
      url: url.getOrgPapers,
      method: "get",
      params: params,
    });
  },
  //获取机构每年引用量
  getOrgAnnualCitation: function (params: any) {
    return Request.axiosInstance({
      url: url.getOrgAnnualCitation,
      method: "get",
      params: params,
    });
  },
  //获取每位作者作品量
  getContribution: function (params: any) {
    return Request.axiosInstance({
      url: url.getContribution,
      method: "get",
      params: params,
    });
  },
  // 门户认领提交信息
  send: function (params: any) {
    return Request.axiosInstance({
      url: url.send,
      method: "post",
      data: params,
    });
  },
  //修改学者个人简介
  editIntro: function (params: any) {
    return Request.axiosInstance({
      url: url.editIntro,
      method: "post",
      data: params,
    });
  },
  //获取每位作者引用量
  getAuthorCitation: function (params: any) {
    return Request.axiosInstance({
      url: url.getAuthorCitation,
      method: "get",
      params: params,
    });
  },
  //获取每篇文章的引用量
  getPaperCitation: function (params: any) {
    return Request.axiosInstance({
      url: url.getPaperCitation,
      method: "get",
      params: params,
    });
  },
  //获取期刊的每年总文献量
  getAnnualPaper: function (params: any) {
    return Request.axiosInstance({
      url: url.getAnnualPaper,
      method: "get",
      params: params,
    });
  },
  //获取期刊的每一期总引用量
  getCitationPerIssue: function (params: any) {
    return Request.axiosInstance({
      url: url.getCitationPerIssue,
      method: "get",
      params: params,
    });
  },
  //获取学者每年的论文数量
  getAuthorAnnualPaper: function (params: any) {
    return Request.axiosInstance({
      url: url.getAuthorAnnualPaper,
      method: "get",
      params: params,
    });
  },
  getAuthorRelations: function (params: any) {
    return Request.axiosInstance({
      url: url.getAuthorRelations,
      method: "get",
      params: params,
    });
  },
};
